<?php
$redis = new Redis();
$redis->connect('127.0.0.1','6379');


if($redis->decr("num") > 0){
    echo "111";
}else{
    echo "2222";
}



if($redis->rpop('num1')){
    echo "111";
}else{
    echo "2222";
}
